<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改图片宽度</title>
    <style>
        img {
            max-width: 300px;/*方法1*/
            /* transform: scale(.5, .5); 方法2 */

            /* box-sizing: border-box;
            padding:0 90px;  方法3*/
        }
    </style>
</head>

<body>
    <!-- 如何实现图片宽度为300px -->
    <img src="./1.jpg" style="width: 480px !important;">
</body>

</html>